#include <cstdio>

int n, a, np=0, ni=0, fp, fi;
int main(){
	//freopen("in.txt", "r", stdin);freopen("out.txt", "w", stdout);
	scanf("%d", &n);
	for(int i=1;i<=n;i++){
		scanf("%d", &a);
		if(a%2){
			fi=i;
			ni++;
		}
		else{
			fp=i;
			np++;
		}
	}
	
	if(ni>np)printf("%d", fp);
	else printf("%d", fi);
	
	return 0;
}
